package com.jbm.jsm.iface;

import com.jbm.core.iface.IAcross;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by Administrator on 2017/9/26.
 */
@Entity
@Table(name = "verify_code", schema = "", catalog = "jsm")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)

public class VerifyCodeEntity extends IAcross
{
    public VerifyCodeEntity()
    {
        super();
    }

    public VerifyCodeEntity(IAcross ia)
    {
        super(ia);
    }

    private int vcId;
    private String mobile;
    private String vvcode;
    private Timestamp expireDate;
    private String type;
    private Timestamp createDate;
    private Integer createId;
    public VerifyCodeEntity(String mobile,String type)
    {
        this.mobile=mobile;
        this.type=type;
    }
    @Id
    @Column(name = "vc_id")
    @GeneratedValue
    public int getVcId() {
        return vcId;
    }

    public void setVcId(int vcId) {
        this.vcId = vcId;
    }

    @Basic
    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Basic
    @Column(name = "vvcode")
    public String getVvcode() {
        return vvcode;
    }

    public void setVvcode(String vvcode) {
        this.vvcode = vvcode;
    }

    @Basic
    @Column(name = "expire_date")
    public Timestamp getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Timestamp expireDate) {
        this.expireDate = expireDate;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }
    @Basic
    @Column(name = "create_id")
    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        VerifyCodeEntity that = (VerifyCodeEntity) o;

        if (vcId != that.vcId) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (expireDate != null ? !expireDate.equals(that.expireDate) : that.expireDate != null) return false;
        if (mobile != null ? !mobile.equals(that.mobile) : that.mobile != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (vvcode != null ? !vvcode.equals(that.vvcode) : that.vvcode != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = vcId;
        result = 31 * result + (mobile != null ? mobile.hashCode() : 0);
        result = 31 * result + (vvcode != null ? vvcode.hashCode() : 0);
        result = 31 * result + (expireDate != null ? expireDate.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        return result;
    }
}
